<?php session_start(); ?>
<script src="function.js"></script>
<?php
if (isset($_FILES["imgFile"])&&$_FILES["imgFile"]["size"]>0&&($_FILES["imgFile"]["type"]=="image/jpeg"||$_FILES["imgFile"]["type"]=="image/png"||$_FILES["imgFile"]["type"]=="image/bmp"))
	{
		$tmpName = $_FILES["imgFile"]["tmp_name"];
		//$fp = fopen($tmpName, "r");
		//$data = fread($fp, filesize($tmpName));
		//$data = addslashes($data);
		//fclose($fp);
		$data=file_get_contents($tmpName);
		if (!isset($_SESSION))
		{
			session_start();
			session_register("imgData");
		}
		$_SESSION["imgData"]=$data;	
		echo "<script>location.href='QLNguoiThue.php';</script>";
	}
?>